home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $VER: SaveDesktop.bed 1.0 (02.01.96)
- **
- ** Load the layout of the desktop fromn a file
- **
- ** Written by Marco Negri
- */
-
- OPTIONS RESULTS
- OPTIONS FAILAT 11
- PARSE ARG name
-
- IF name = "" THEN DO
- RequestFile 'TITLE "Select File to Load as Layout"' 'PATTERN "#?.layout"' 'BED:Support/'
- IF RC ~= 0 THEN EXIT
- name = RESULT
- END
-
- ADDRESS BED
-
- IF Open(file,name,READ) THEN DO
-
- DO FOREVER
- name = ReadLn(file)
-
- IF name = "" THEN EXIT
-
- window = ReadLn(file)
- coord = ReadLn(file)
- a = ReadLn(file)
-
- OpenDoc 'WINDOW=' || window || " " || name
- ADDRESS VALUE RESULT
- Move coord
- END
- END
-
- /*
- IF Open(save,name,WRITE) THEN DO
- DO WHILE docs ~= ""
- PARSE VAR docs '"'.'"' port docs
-
- ADDRESS VALUE port
-
- GetFilePath
- WriteLn(save,RESULT)
-
- GetWindowInfo
- PARSE VAR RESULT icon x1 y1 w1 h1 .
-
- IconifyWindow TOGGLE
-
- GetWindowInfo
- PARSE VAR RESULT . x2 y2 w2 h2 .
-
- IconifyWindow TOGGLE
-
- IF icon = ON THEN DO
- str = x2 || '/' || y2 || '/' || w2 || '/' || h2 || '/' || x1 || '/' || y1 || '/ICONIFY'
- END; ELSE DO
- str = x1 || '/' || y1 || '/' || w1 || '/' || h1 || '/' || x2 || '/' || y2
- END
- WriteLn(save,str)
-
- GetCursorPos
- str = WORD(RESULT,1) WORD(RESULT,2)
- WriteLn(save,str)
-
- WriteLn(save,"")
-
- i = i+1
- END
-
- Close(save)
- END
- */